<div class="dialog-header">
  <div class="folder-dialog-info">
    <span class="material-icons">
      password
    </span>
    <div>
      <div class="fw-600 fs-17 text-dark">重置密码</div>
    </div>
  </div>
  <div class="close-icon" (click)="onNoClick()">
    <span class="material-icons cursor-pointer">
      close
    </span>
  </div>
</div>
<div class="d-content">
  <form [formGroup]="resetPasswordForm">
    <div class="col-md-12">
      <div class="form-group">
        <label>邮箱</label>
        <input [attr.disabled]="true" formControlName="email" class="form-control" type="email">
      </div>
    </div>
    <div class="col-md-12">
      <div class="form-group">
        <label>密码</label>
        <input autocomplete="new-password" formControlName="password" class="form-control" type="password">
        <div *ngIf="resetPasswordForm.get('password').touched && resetPasswordForm.get('password').errors">
          <div class="text-danger" *ngIf="resetPasswordForm.get('password').errors?.required">
            密码不能为空.
          </div>
          <div class="text-danger" *ngIf="resetPasswordForm.get('password').errors?.minlength">
            您必须输入至少6位数字
          </div>
        </div>
      </div>
    </div>
    <div class="col-md-12">
      <div class="form-group">
        <label>确认密码</label>
        <input autocomplete="new-password" formControlName="confirmPassword" class="form-control" type="password">
        <div
          *ngIf="resetPasswordForm.get('confirmPassword').touched && resetPasswordForm.get('confirmPassword').errors">
          <div class="text-danger" *ngIf="resetPasswordForm.get('confirmPassword').errors?.required">
            确认密码不能为空.
          </div>
        </div>
        <div class="text-danger"
          *ngIf="resetPasswordForm.get('confirmPassword').touched && resetPasswordForm.hasError('notSame')">
          密码不匹配.
        </div>
      </div>
    </div>
  </form>
  <div mat-dialog-actions>
    <button class="btn btn-primary btn-sm m-right-10" (click)="resetPassword()" cdkFocusInitial> <i
        class="fas fa-save"></i> 保存</button>
    <button class="btn btn-danger btn-sm" (click)="onNoClick()"><i class="fas fa-times-circle"></i> 取消</button>
  </div>
</div>
